package ua.com.stormlabs.tiny.licenseserver.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.webflow.execution.Action;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;

/**
 * @author mbondarenko
 * @version 1.0 7/26/13
 */
@Controller("setMessageController")
public class WebflowController implements Action {

    @Override
    public Event execute(RequestContext req) throws Exception {
        String name = req.getRequestParameters().get("value");
        req.getFlowScope().put("message", "Hello " + name);
        return new Event(this, "ok");
    }
}
